package util;

/**
 * 
 * @author Dennis.Eicker
 * 
 */
public class WebServiceException extends Exception {

	private static final long serialVersionUID = -7406299162740132513L;

	public static enum ExceptionType {
		UNKNOWN_ERROR, DATABASE_ERROR, URL_ERROR, AUTORISATION_ERROR, AUTHENTICATION_ERROR, WRONG_PASSWORD, USER_NOT_FOUND
	}

	private ExceptionType exceptionType = ExceptionType.UNKNOWN_ERROR;

	public WebServiceException() {
	}

	/**
	 * 
	 * Used for non-exception-caused application level exceptions
	 * 
	 * @param faultString
	 */
	public WebServiceException(ExceptionType exceptionType) {
		this.exceptionType = exceptionType;
	}

	public String getMessage() {
		return exceptionType.name();
	}

	public ExceptionType getExceptionType() {
		return exceptionType;
	}

	public void setExceptionType(ExceptionType exceptionType) {
		this.exceptionType = exceptionType;
	}

}
